﻿@model Hrm.Core.Resource

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div id="page-header" class="clearfix">
    <div class="page-header">
        <h2>菜单管理</h2>
        <span class="txt">可以增删查改一个系统的菜单</span>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default toggle panelMove panelClose panelRefresh">
            <div class="panel-heading">
                <h4 class="panel-title">操作界面</h4>
            </div>
            <div class="panel-body pt0 pb0">
                @using (Html.BeginForm("Create", "Resources", new { area = "Permissions" }, FormMethod.Post, new { @class = "form-horizontal group-border stripped" }))
                {

                    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                    @Html.AntiForgeryToken()

                    <div class="form-group">
                        @Html.Label("所属应用", htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">

                            @Html.DropDownList("applicationId", null, new { @class = "form-control" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Code, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">
                            @Html.EditorFor(model => model.Code, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.Code, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">
                            @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.ParentCode, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">

                            @Html.DropDownList("ParentCode", null, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.ParentCode, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Type, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">
                            @Html.DropDownList("Type", null, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.Type, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Order, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">
                            @Html.EditorFor(model => model.Order, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.Order, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Url, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">
                            @Html.EditorFor(model => model.Url, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.Url, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.GlyphiconsClass, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">
                            @Html.EditorFor(model => model.GlyphiconsClass, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.GlyphiconsClass, "", new { @class = "text-danger" })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "col-lg-2 col-md-3 control-label" })
                        <div class="col-lg-10 col-md-9">
                            @Html.EditorFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } })
                            @Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" })
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-md-offset-3 col-lg-10 col-md-9">
                            <input type="submit" value="保存" class="btn btn-primary" />
                            <a href="@Url.Action("Index")" class="btn btn-primary">返回</a>
                        </div>
                    </div>
                }
            </div>
        </div>
    </div>
</div>